package com.laycoding.layrpc.common;

import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

public class LayRpcAnnotationCache {
    public static ConcurrentHashMap<String, Class<?>> map = new ConcurrentHashMap<>();


    public static void put(String className,Class<?> clazz) {
        map.put(className, clazz);
    }


    public static List<Class<?>> getAll(){
        List<Class<?>> collect = map.keySet().stream().map(
                s ->  map.get(s)
        ).collect(Collectors.toList());
        return collect;
    }
}
